import random

def generate_cases():
    cases = [
        (3, 7),
        (3, 2),
        (7, 3),
        (3, 3),
        (1, 1),
        (10, 10),
        (20, 15),
        (100, 1),
        (1, 100),
        (100, 100)
    ]
    # 随机生成一些额外用例
    for _ in range(5):
        m = random.randint(1, 100)
        n = random.randint(1, 100)
        cases.append((m, n))
    return cases

if __name__ == "__main__":
    for m, n in generate_cases():
        print(f"{m} {n}")
